/*
 */

package beans;


import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Milan Boricic <boricic@gmail.com>
 */
public class Dan {

    public static final Map<Integer, String> imenaDana;
    static {
        Map<Integer, String> tmp = new HashMap<Integer, String>();
        tmp.put(Calendar.MONDAY, "Ponedeljak");
        tmp.put(Calendar.TUESDAY, "Utorak");
        tmp.put(Calendar.WEDNESDAY, "Sreda");
        tmp.put(Calendar.THURSDAY, "Četvrtak");
        tmp.put(Calendar.FRIDAY, "Petak");
        imenaDana = Collections.unmodifiableMap(tmp);
    }

    private String naziv;
    private Date datum;
    private List<Termin> termini;
    private NeradniDan neradan;

    public Dan() {}

    public Date getDatum() {
        return datum;
    }

    public void setDatum(Date datum) {
        this.datum = datum;
    }

    public String getNaziv() {
        return naziv;
    }

    public void setNaziv(String naziv) {
        this.naziv = naziv;
    }

    public List<Termin> getTermini() {
        return termini;
    }

    public void setTermini(List<Termin> termini) {
        this.termini = termini;
    }

    public String getImeDana(Integer i) {
        return imenaDana.get(i);
    }

    public NeradniDan getNeradan() {
        return neradan;
    }

    public void setNeradan(NeradniDan neradan) {
        this.neradan = neradan;
    }

    public String getDatumString() {
        SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy.");
        return formatter.format(datum);
    }

    
}
